package com.linzt.candy.wxmp.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.linzt.candy.wxmp.domain.WxMpInfo;
import com.linzt.candy.wxmp.mapper.WxMpInfoMapper;
import com.linzt.candy.wxmp.service.IWxMpInfoService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author linzt
 * @Date 2020/12/218:08 上午
 * @Description 微信公众号信息服务实现类
 * @Version 1.0
 */
@Service
@Primary
public class WxMpInfoServiceImpl extends ServiceImpl<WxMpInfoMapper, WxMpInfo> implements IWxMpInfoService {

    private static final Logger logger = LoggerFactory.getLogger(WxMpUserServiceImpl.class);
    @Resource
    private WxMpInfoMapper wxMpMapper;

    @Override
    public WxMpInfo findByAppId(String appId) {
        return wxMpMapper.findByAppId(appId);
    }

    @Override
    public List<WxMpInfo> selectToList(WxMpInfo wxMpInfo) {
        QueryWrapper<WxMpInfo> wrapper = new QueryWrapper<>();
        wrapper.setEntity(wxMpInfo);
        return wxMpMapper.selectList(wrapper);
    }

}
